<template>
	<view>
		<card :showH="true" headTitle="热门搜索"  bodyCover="/static/images/demo/search-banner.png"/>
		
		<!-- 变色按钮区域 -->
		<view class="moreColorBtn p-2 mt-1">
			<block v-for="(item,i) in hot" :key="i"> 
				<colorTab :item="item"/>
			</block>
		</view>
		
		<!-- 常用分类 -->
		<card :showH="true" :handlepy="true" :showBorderBom="false" headTitle="常用分类">
			<block v-for="(item,i) in cate" :key="i">
				<colorTab :item="item" :iShowColor="false"/>
			</block>
		</card>
		<card :showH="true" :showBorderBom="false" headTitle="搜索记录">
			<uniList title="小米" :showArrow="false"/>
			<uniList title="小米" :showArrow="false"/>
			<uniList title="小米" :showArrow="false"/>
			<uniList title="小米" :showArrow="false"/>
		</card>
	</view>
</template>

<script>
	import card from '@/components/common/card.vue'
	import colorTab from '@/components/search/color_tab.vue'
	import uniList from '@/components/uni/uni-list-item/uni-list-item.vue'
	export default {
		components:{
			card,
			colorTab,
			uniList
		},
		data() {
			return {
				hot:[
					{ name:'领券中心' },
					{ name:'Redmi K20' },
					{ name:'RedmiBook 14' },
					{ name:'智能积木 越野四驱车' },
					{ name:'手环 腕带' },
				],
				cate:[
					{ name:'耳机' },
					{ name:'手机' },
					{ name:'音箱' },
					{ name:'手表' },
					{ name:'配件' },
					{ name:'网关/传感器' },
					{ name:'健康' },
					{ name:'酷玩' },
				],
			}
		},
		onNavigationBarButtonTap(e) {
			if(e.index===0){
				uni.navigateTo({
					url: '../seach_list/seach_list'
				});
			}
		},
		methods: {
			
		}
	}
</script>

<style>

</style>
